<!--内容-->
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>学员列表</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport"
          content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link href="__PUBLIC__/css/layui.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/css/admin.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/css/public.css" rel="stylesheet" type="text/css"/>
    <link href="__PUBLIC__/css/bootstrap.css" rel="stylesheet" type="text/css"/>
		<link rel="stylesheet" href="__PUBLIC__/css/looklayer.css"  media="all">
    <style>
        
    </style>
</head>
<body>
<div class="layui-conter">
    <div class="layui-col-md12">
        <div class="navigation">
            <span>教务></span><span>已排班学员列表</span>
        </div>

        <div class="white-conter">
            <div class="layui-col-md12">
                <div class="layui-card">
                    <div class="title-blue">学员列表</div>
                    <div class="layui-card-body addPadding">
                        <form class="layui-form" action="" lay-filter="component-form-group">
                            <div class="layui-form-item">
                                <label class="layui-form-label">高级搜索：</label>
                                <div class="layui-input-block">
                                    <div class="layui-col-xs4">
                                        <input style="background: #dce6f0;border: none" type="text" value="{$map.title}" name="title" lay-verify="title" autocomplete="off" placeholder="姓名/编号" class="layui-input">
                                    </div>
                                    <button class="layui-btn layui-btn-sm layui-btn-normal" style="margin: -10px 25px 0px 25px;vertical-align: text-top;">搜索</button>
                                    <div class="more">更多筛选<i class="layui-icon layui-icon-up"></i> </div>
                                </div>
                            </div>
                            <div class="more_show" style="display: none;">                                                        
                                <div class=" layui-row" style="margin-top: 20px">
                                    <div class=" layui-col-xs3">
                                        <label class="layui-form-label">课程：</label>
                                        <div class="layui-input-block">
                                            <select name="kname">
                                                <option value="" selected="">请选择</option>
                                                    <foreach name="kname" item="szz" key="kzz">
                                                        <option value="{$kzz}" <if condition="$map.kname eq $kzz">selected</if> >{$szz}</option>
                                                    </foreach>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="layui-col-xs3">
                                        <label class="layui-form-label">手机号码：</label>
                                        <div class="layui-input-block">
                                            <input type="tel" name="tel" value="{$map.tel}" class="layui-input">
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </form>
                    </div>
                </div>
                <div class="layui-col-md12">
                    <div class="layui-card">
                        <div class="layui-card-body">
                            <div class="layui-btn-group" style="margin:0 0 20px">
                            </div>
                            <table  class="layui-hide" id="test-table-operate" lay-filter="test-table-operate"></table>
                            <div class="layui-form layui-border-box layui-table-view" lay-filter="LAY-table-1">
                                <div class="layui-table-box" style="margin-bottom: 20px">
                                    <div class="layui-table-body layui-table-main layui-col-md10">
                                        <table cellspacing="0" cellpadding="0" border="0" class="layui-table">
                                            <thead>
                                            <tr>
                                                <th data-field="0" data-unresize="true">
                                                    <div class="layui-table-cell laytable-cell-1-0 laytable-cell-checkbox">
                                                        <input type="checkbox" name="0" lay-skin="primary" lay-filter="allChoose">
                                                    </div>
                                                </th>
                                                <th data-field="id">
                                                    <div class="layui-table-cell laytable-cell-1-id">
                                                        <span>学生编号</span>
                                                        </span>
                                                    </div>
                                                </th>
                                                <th data-field="username">
                                                    <div class="layui-table-cell laytable-cell-1-username" align="center">
                                                        <span>学生姓名</span>
                                                    </div>
                                                </th>
                                                <th data-field="phone">
                                                    <div class="layui-table-cell laytable-cell-1-phone" align="center">
                                                        <span>手机号</span>
                                                    </div>
                                                </th>
                                                <th data-field="campus">
                                                    <div class="layui-table-cell laytable-cell-1-campus" align="center">
                                                        <span>校区</span>
                                                    </div>
                                                </th>
                                                <th data-field="campus">
                                                    <div class="layui-table-cell laytable-cell-1-campus" align="center">
                                                        <span>报名课程</span>
                                                    </div>
                                                </th>
                                                <th data-field="registrationtime">
                                                    <div class="layui-table-cell laytable-cell-1-registrationtime" align="center">
                                                        <span>报名时间</span>
                                                    </div>
                                                </th>
																								<th data-field="operation">
																										<div class="layui-table-cell laytable-cell-1-operation" align="center">
																												<span>操作</span>
																										</div>
																								</th>
                                            </tr>
                                            </thead>
                                            <tbody>
																						<foreach name="sc_data" item="s">
                                            <tr data-index="0" class="">
                                                <td data-field="0">
                                                    <div class="layui-table-cell laytable-cell-1-0 laytable-cell-checkbox">
                                                         <input type="checkbox" name="1" lay-skin="primary">
                                                    </div>
                                                </td>
                                                <td data-field="id" align="center">
                                                    <div class="layui-table-cell laytable-cell-1-id" style="padding-right: 0px;">{$s.student_id}</div>
                                                </td>
                                                <td data-field="username" align="center">
                                                    <div class="layui-table-cell laytable-cell-1-username">{$s.name}</div>
                                                </td>
                                                <td data-field="phone" align="center">
                                                    <div class="layui-table-cell laytable-cell-1-phone">{$s.phone} </div>
                                                </td>
                                                <td data-field="campus" align="center">
                                                    <div class="layui-table-cell laytable-cell-1-campus"> {$s.x_name}  </div>
                                                </td>
                                                <td data-field="campus" align="center">
                                                    <div class="layui-table-cell laytable-cell-1-campus"> {$s.k_name}  </div>
                                                </td>
                                                <td data-field="registrationtime" align="center">
                                                    <div class="layui-table-cell  laytable-cell-1-registrationtime">
                                                        {$s.edit_time}
                                                    </div>
                                                </td>
                                                <td data-field="operation" align="center" >
                                                		<div class="layui-table-cell laytable-cell-1-operation">
                                                			<button data-method="offset" data-type="auto" data-id="{$s.id}"  class="img-but look-img"></button>
                                                		</div>
                                                </td>
                                            </tr>
																						</foreach>
                                            </tbody>
                                        </table>
                                    </div>
                                </div>
                                <div class="pagination" style="margin: 0 auto">
                                    {$page}
                                </div>
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>


    </div>
</div>
</body>
<script src="__PUBLIC__/js/layui.all.js"></script>
<script src="__PUBLIC__/js/jquery.js"></script>
<script src="__PUBLIC__/js/bootstrap.js"></script>
<script>
    layui.use(['laydate','form','element'], function(){
        var form = layui.form
            ,layer = layui.layer
            , $ = layui.jquery
            ,element = layui.element
            , laydate = layui.laydate;
						var active = {
									offset: function(othis){
											var type = othis.data('type')
													,text = othis.text();
											layer.open({
													type: 1,
													title: false,
													area: ['1000px', '572px'],
													shadeClose: true,
													skin: 'layer-look',
													content:'<form class="layui-form layer_notice"  action="{:U("Studentlist/edit")}" method="post" lay-filter="test1" >' +
													'</form>'
											});
			
									}
							};
							$('.look-img').on('click', function(){
									var othis = $(this), method = othis.data('method'),id = othis.data('id');
									active[method] ? active[method].call(this, othis) : '';
									$.post("{:U('Customer/look_img')}",{id:id},function(data){
										console.log(data);
										var html= '<div class="look-conter">' +
												'    <div class="look-title">客户详细信息</div>' +
												'</div>' +
												'<div class="layui-col-md12 msgCont">' +
												'<div class="layui-col-md6">' +
												'<input type="hidden" name="id" value="'+data.id+'">' +
												'<div class="listTop"><div class="layui-col-md5">客户姓名</div><div class="layui-col-md6">'+data.name+'</div></div>' +
												'<div class="listTop"><div class="layui-col-md5">英文名称</div><div class="layui-col-md6">'+data.names+'</div></div>' +
												'<div class="listTop"><div class="layui-col-md5">性别</div><div class="layui-col-md7">'+data.sex+'</div></div>' +
												'<div class="listTop"><div class="layui-col-md5">出生年月</div><div class="layui-col-md7">'+data.birth_date+'</div></div>' +
												'<div class="listTop"><div class="layui-col-md5">咨询校区</div><div class="layui-col-md7">'+data.x_name+'</div></div>' +
												'<div class="listTop"><div class="layui-col-md5">上次咨询时间</div><div class="layui-col-md7">2018-05-30</div></div>' +
												'<div class="listTop"><div class="layui-col-md5">下次回访时间</div><div class="layui-col-md7">2018-05-30</div></div>' +
												'<div class="listTop"><div class="layui-col-md5">渠道来源</div><div class="layui-col-md7">'+data.am_name+'</div></div>' +
												'</div>' +
												'<div class="layui-col-md6">' +
												'<div class="listTop"><div class="layui-col-md5">手机</div><div class="layui-col-md7">'+data.phone+'</div></div>' +
												'<div class="listTop"><div class="layui-col-md5">其他电话</div><div class="layui-col-md7">'+data.other_phone+'</div></div>' +
												 '<div class="listTop"><div class="layui-col-md5">客户状态</div>' +
												'<div class="layui-col-md7">' +
												'<select name="state_id" style="display: block"> ';
													for(var i=0;i<data['state_name'].length;i++){
														if(data['state_id']==data['state_name'][i]['id']){
																html += '<option value="'+data['state_name'][i].id+'" selected>'+data['state_name'][i].name+'</option>' ;
														}
													}							
												html += '<option value="9">已报名</option></select>' +

												'</div>' +
												'</div>' +
												'<div class="listTop"><div class="layui-col-md5">咨询顾问</div><div class="layui-col-md7">'+data.xs_name+'</div></div>' +
												'<div class="listTop"><div class="layui-col-md5">数据采集人</div><div class="layui-col-md7">'+data.sc_name+'</div></div>' +
												'</div>  <div class="layui-col-md12">\n' +
												'                        </div>' +
												'</div>';
										$('.layer_notice').append(html);
									})
							});
						//全选
				form.on('checkbox(allChoose)', function(data){
								var child = $(data.elem).parents(".layui-col-md10").find('input[type="checkbox"]');
						child.each(function(index, item){
							item.checked = data.elem.checked;
						});
						form.render('checkbox');
				});
        //执行一个laydate实例
        laydate.render({
            elem: '#signTime' //指定元素
        });
        var shows=false;
        $('.more').on('click',function(){
            if(shows == false){
                $('.more_show').show()
                $(this).find('.layui-icon').removeClass('layui-icon-up')
                $(this).find('.layui-icon').addClass('layui-icon-down')
                shows=true;
            }else if(shows == true){
                $('.more_show').hide()
                $(this).find('.layui-icon').removeClass('layui-icon-down')
                $(this).find('.layui-icon').addClass('layui-icon-up')
                shows=false
            }

        })
    });
</script>
<script>
    layui.use('laydate', function(){
        var laydate = layui.laydate;
        //执行一个laydate实例
        laydate.render({
            elem: '#birthday' //指定元素
        });
    });
</script>
</html>
<!--底部-->